package com.xiaoshuidi.cloud.module.report.framework.config;

import com.xiaoshuidi.cloud.framework.datapermission.core.rule.dept.DeptDataPermissionRuleCustomizer;
import com.xiaoshuidi.cloud.module.report.dal.DO.report.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration(proxyBeanMethods = false)
public class DataPermissionConfiguration {
    @Bean
    public DeptDataPermissionRuleCustomizer dataPermissionRuleCustomizer() {
        return rule -> {
            rule.addDeptColumn(ReportLedgerInfoDO.class);
            rule.addDeptColumn(ReportPaymentDetailsDO.class);
            rule.addDeptColumn(ReportRentPeriodDetailsDO.class);
            rule.addDeptColumn(ReportRoomReserveDO.class);
            rule.addDeptColumn(ReportSalesControlDO.class);
        };
    }
}
